<?php
require 'database2.php';
session_start();
if($_SERVER["REQUEST_METHOD"]=="POST")
{
	$loginName = addslashes($_POST['login']);
	$localpassword = addslashes($_POST['password']);	
}
$query = "SELECT loginID FROM LoginMaster where login='$loginName' and password='$localpassword'";
$result=$db->query($query);
$rows=$result->fetchAll();
$c=count($rows);
if($c==1)
{
	session_register("loginName");
	$_SESSION['login_user']=$loginName;
	include("index.html");
}
else
{
	print("Your login name or password is invalid");
}
?>
